﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;

namespace SubStationManagement.Server.Models
{
    public class RecordingModule
    {
        [BsonId]
        [BsonRepresentation(BsonType.ObjectId)]
        [Display(Name = "Id")]
        [NotNull]
        public string? Id { get; set; }

        /// <summary>
        /// 获得/设置 标识序号
        /// </summary>
        [Display(Name = "标识序号")]
        [NotNull, Required]
        public string? SerialNumber { get; set; }

        /// <summary>
        /// 获得/设置 设备状态
        /// </summary>
        [Display(Name = "设备状态")]
        public EnumMeasureModuleState ModuleState { get; set; }

        /// <summary>
        /// 获得/设置 电气采样频率
        /// </summary>
        [Display(Name = "录波采样频率")]
        [NotNull, Required]
        public EnumRecordingRate RecordingRate { get; set; }

        /// <summary>
        /// 获得/设置 Enable
        /// </summary>
        [Display(Name = "启用")]
        public bool Enable { get; set; }
    }
}

public enum EnumRecordingRate
{
    /// <summary>
    /// 
    /// </summary>
    [Description("3.2K")]
    F32K,

    /// <summary>
    /// 
    /// </summary>
    [Description("6.4K")]
    F64K,
}

